package com.rbac.modules.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("sys_login_log")
@Schema(description = "登录日志")
public class SysLoginLog {

    @TableId(type = IdType.AUTO)
    @Schema(description = "日志ID")
    private Long id;

    @Schema(description = "用户名")
    private String username;

    @Schema(description = "登录IP")
    private String ip;

    @Schema(description = "浏览器")
    private String browser;

    @Schema(description = "操作系统")
    private String os;

    @Schema(description = "登录状态（0：失败，1：成功）")
    private Integer status;


    @Schema(description = "登录时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime loginTime;

}
